//
//  SLHomeMsgCell.swift
//  sulit-loan
//
//  Created by 王刚锋 on 2025/4/13.
//  Copyright © 2025 coolBoy. All rights reserved.
//

import UIKit

class SLHomeMsgCell: UITableViewCell {

    lazy var icon:UIImageView = {
        let v = create_imageView(image: IMAGE("icn_head"), mode: .scaleToFill, supView: self.contentView) { make in
            make.left.equalTo(15)
            make.centerY.equalToSuperview()
            make.width.height.equalTo(30)
        }
        return v
    }()
    lazy var msgL: UILabel = {
        let v = create_label(text: "", textColor: .black, textFont: SLFontConfig.medium10, supView: self.contentView) { make in
            make.left.equalTo(55)
            make.centerY.equalToSuperview()
        }
        return v
    }()
    func setMsg(msg:String){
        self.msgL.text = msg
        self.icon.isHidden = false
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
//        if selected {
//            UIView.animate(withDuration: 0.3) { [weak self] in
//                guard let aSelf = self else { return }
//                aSelf.icon.snp.updateConstraints { make in
//                    make.left.equalTo(15)
//                    make.centerY.equalToSuperview()
//                    make.width.height.equalTo(30)
//                }
//                aSelf.msgL.textColor = .black
//            }
//
//
//        }else{
//            UIView.animate(withDuration: 0.3) { [weak self] in
//                guard let aSelf = self else { return }
//                aSelf.icon.snp.updateConstraints { make in
//                    make.left.equalTo(15)
//                    make.centerY.equalToSuperview()
//                    make.width.height.equalTo(22)
//                }
//                aSelf.msgL.textColor = rgba(hex: "#666666")
//            }
//
//        }
    }
}
